package com.tpo.jnotes.client.layer.view.dialogs.listeners;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import com.tpo.jnotes.client.layer.view.dialogs.NBaseFrame;
import com.tpo.jnotes.client.lib.component.popup.NPopup;

public class NEditorListener implements MouseListener
{

    private final NPopup customNotePopup;
    private final NBaseFrame noteFrame;

    public NEditorListener( NBaseFrame aNoteFrame )
    {
        customNotePopup = new NPopup( aNoteFrame );
        noteFrame = aNoteFrame;
    }

    @Override
    public void mouseClicked( MouseEvent aEvent )
    {
        if( aEvent.getButton() == MouseEvent.BUTTON3 )
        {
            customNotePopup.show( noteFrame, aEvent.getX(), aEvent.getY() );
        }
    }

    @Override
    public void mousePressed( MouseEvent aEvent )
    {
    }

    @Override
    public void mouseReleased( MouseEvent aEvent )
    {
    }

    @Override
    public void mouseEntered( MouseEvent aEvent )
    {
    }

    @Override
    public void mouseExited( MouseEvent aEvent )
    {
    }
}
